#include <iostream>
#include "ShareMemory.hpp"
#include "Time.hpp"
#include "Fifo.hpp"
#include <string.h>


int main()
{
    shm.GetShm();
    shm.AttachShm();
    gpipe.OpenPipeForWrite();

    struct data* image = (struct data*)shm.GetAddr();
    char ch = 'A';
    while(ch<='Z')
    {
        strcpy(image->status,"最新");
        strcpy(image->lasttime,GetCurrTime().c_str());
        strcpy(image->image,"XXXXXXXXXXXXX");
        gpipe.Signal();
        sleep(3);
    }
    shm.DetachShm();
    return 0;
}
// int main()
// {
//     key_t k = ftok(gpath.c_str(),gprojId);
//     std::cout<<"k: "<<ToHex(k)<<std::endl;
//     return 0;
// }